package com.isoftstone.service;

import com.github.pagehelper.Page;
import com.isoftstone.pojo.Payment;
import com.isoftstone.util.Result;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Optional;

public interface PaymentService {
    Result<?> insertPayment(Payment payment);

    Result<?> deletePayment(Integer id);

    Result<?> updatePayment(Integer id, Payment payment);

    Optional<Payment> getPaymentById(Integer id);

    Page getAllPayments(Integer currentPage, Integer pageSize);

    //根据学期进行查询
    Page selectPaymentsBySemester(String semester, Integer currentPage, Integer pageSize);

    //根据学年进行查询
    Page selectPaymentsByAcademicYear(String academicYear, Integer currentPage, Integer pageSize);

}
